<?php
import("com.miho.io.request.GetRequest");
import("com.miho.io.request.PostRequest");
class Request {
	private static $_instance;
	/**
	 * Enter description here...
	 *
	 * @return Request
	 */
	public static function instance(){
		if(self::$_instance==null) {
			self::$_instance = new Request();
		}
		return self::$_instance;
	}
	
	private $_getRequest;
	private $_postRequest;
	private function __construct(){
		$this->_getRequest = new GetRequest();
		$this->_postRequest = new PostRequest();
	}
	
	/**
	 * Enter description here...
	 *
	 * @param string $name
	 * @return BaseRequest
	 */
	public function __get($name){
		if($name=="get") return $this->_getRequest;
		if($name=="post") return $this->_postRequest;
		throw new NullPointerException();
	}
}

?>